// 输出两个关系的合成关系
#include <iostream>
#include <vector>


using namespace std;

vector<vector<int> > composition(vector<vector<int> > x1, vector<vector<int> > x2)
{
    vector<vector<int> > x(x1.size());
    for (int i = 0; i < x1.size(); ++i) {

        for (int j = 0; j < x2[0].size(); ++j) {
            int s = 0;
            for (int k = 0; k < x2.size(); ++k) {
                s += x1[i][k] * x2[k][j];
            }
            x[i].push_back(s != 0);
        }
    }
    return x;
}


int main()
{
    int x,y,z;
    cin>>x>>y>>z;
    vector<vector<int> > r1(x);
    vector<vector<int> > r2(y);
    vector<vector<int> > r(x);
    for (int i = 0; i < x; i++)
    {
        for (int j = 0; j < y; j++)
        {
            int t;
            cin>>t;
            r1[i].push_back(t);
        }
    }
    for (int i = 0; i < y; i++)
    {
        for (int j = 0; j < z; j++)
        {
            int t;
            cin>>t;
            r2[i].push_back(t);
        }
    }
//
//    for (int i = 0; i < x; ++i) {
//
//        for (int j = 0; j < z; ++j) {
//            int s = 0;
//            for (int k = 0; k < y; ++k) {
//                s += r1[i][k] * r2[k][j];
//            }
//            r[i].push_back(s != 0);
//        }
//    }

    r = composition(r1, r2);

    for (int i = 0; i < x; ++i) {
        for (int j = 0; j < z; ++j) {
            cout<<r[i][j]<<" ";
        }
        cout<<endl;
    }
    return 0;
}
